#!/bin/bash
echo "start up jar!"
openSwitch=true
mountIP=`/sbin/ifconfig -a|grep inet|grep -v 127.0.0.1|grep -v inet6|awk '{print $2}'|tr -d "addr:"`
timeout="156400"
detectMode="1"
productLine="bj"
farmlandForm="guarding"
nfsShell="auto-nfs.sh"
nfsShutDown="shutdownnfs.sh"
CONFIG_URL="http://codingstylefullcheck.inhuawei.com/config"
uccurl="http://codingstylefullcheck.inhuawei.com/tool"
fullConfigName="reviewbot_c.properties"
mergeConfigName="reviewbot_java.properties"
codestylecheckUrl="http://cscreport.inhuawei.com:8080"
REVIEWBOT_URL="http://codingstylefullcheck.inhuawei.com/main/"
codestylecheckResult="http://codingstylecheck.inhuawei.com:8080/codestylecheck/home"
basepath=$(cd `dirname $0`; pwd)
nohup="nohup.out"
echo "$basepath"
cd $basepath
chmod 777 ./autoNfs/$nfsShell
chmod 777 ./autoNfs/$nfsShutDown
chmod 777 ./autoNfs/UCC
chmod 777 ./jdk1.7.0_17/bin/java
rm -rf $nohup
cd /usr1/linux_buildcloud-agent/plugins/Reviewbot_V3R1
nohup ./jdk1.7.0_17/bin/java -jar ReviewBot-2.2.9.jar farmlandForm=$farmlandForm productLine=$productLine codestylecheckResult=$codestylecheckResult codestylecheckUrl=$codestylecheckUrl basepath=$basepath mergeConfigName=$mergeConfigName fullConfigName=$fullConfigName uccurl=$uccurl CONFIG_URL=$CONFIG_URL nfsShell=$nfsShell mountIP=$mountIP openSwitch=$openSwitch timeout=$timeout detectMode=$detectMode REVIEWBOT_URL=$REVIEWBOT_URL 
echo "end"
